import com.demo.Controller.StudentController;
import com.demo.Controller.UserAdviceController;
import com.demo.Controller.UserController;
import com.demo.component.ARticleController;
import com.demo.module.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2023-05-24
 * Time:1:15
 */
public class Second {
    public static void main(String[] args) {
        //1.得到上下文对象
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");

        //2.获取 Bean
        UserController userController = context.getBean("userController",UserController.class);
        userController.getUser();

        UserAdviceController userAdviceController = context.getBean("userAdviceController",UserAdviceController.class);
        userAdviceController.getUser();
    }
}
